package com.jxy.edu.manage_cms;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

/**
 * @author lumi
 * @date 2019/12/17 13:11
 */
@EnableDiscoveryClient //一个EurekaClient从EurekaServer发现服务
@SpringBootApplication
@ComponentScan(value = "com.jxy.edu.api")
@EntityScan(value = "com.jxy.edu.domain.cms")
@ComponentScan(value ="com.jxy.edu.manage_cms" )
@ComponentScan(value = "com.jxy.edu.common")
public class ManageCmsApplication {
    public static void main(String[] args) {
        SpringApplication.run(ManageCmsApplication.class,args);
    }
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate(new OkHttp3ClientHttpRequestFactory());
    }
}
